import request from '@/utils/request'

// 查询请假类型列表
export function listLeaveType(query) {
  return request({
    url: '/out/leaveType/list',
    method: 'get',
    params: query
  })
}

// 查询请假类型详细
export function getLeaveType(leaveId) {
  return request({
    url: '/out/leaveType/' + leaveId,
    method: 'get'
  })
}

// 新增请假类型
export function addLeaveType(data) {
  return request({
    url: '/out/leaveType',
    method: 'post',
    data: data
  })
}

// 修改请假类型
export function updateLeaveType(data) {
  return request({
    url: '/out/leaveType',
    method: 'put',
    data: data
  })
}

// 删除请假类型
export function delLeaveType(leaveId) {
  return request({
    url: '/out/leaveType/' + leaveId,
    method: 'delete'
  })
}
